//
//  YHHexKeyBoard.m
//  BLE4.0Example
//
//  Created by yh on 11/10/2017.
//  Copyright © 2017 saint. All rights reserved.
//

#import "YHHexKeyBoard.h"

@implementation YHHexKeyBoard


- (void)awakeFromNib{
    [super awakeFromNib];
    for (UIView *view  in self.subviews) {
        if ([view isKindOfClass:[UIButton class]]) {
            UIButton *btn = (UIButton *)view;
            [btn addTarget:self action:@selector(btnAction:) forControlEvents:UIControlEventTouchUpInside];
//            [UIFont fontWithName:@"Helvetica-Bold" size:20]]
            
            btn.titleLabel.font =  [UIFont fontWithName:@"Helvetica-Bold" size:18];
        }
    }
}


- (void)btnAction:(UIButton *)sender{
    NSLog(@"自定义键盘 -- %@",sender.titleLabel.text);
    
    if (self.keyBoardCallBack) {
        self.keyBoardCallBack(sender.titleLabel.text);
    }
    
    
    
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
